package com.enseirb.bdxmap.converter;

import java.util.List;

import com.enseirb.bdxmap.dao.DefibrillatorMarkerDAO;
import com.enseirb.bdxmap.dao.dto.DefibrillatorMarkerDTO;
import com.enseirb.bdxmap.exception.BdxMapException;
import com.enseirb.bdxmap.service.model.DefibrillatorMarkerBO;

public class DefibrillatorMarkerConverter extends AbstractMarkerConverter<DefibrillatorMarkerDTO, DefibrillatorMarkerBO> {
	
	private DefibrillatorMarkerDAO defibrillatorDAO = new DefibrillatorMarkerDAO();
	
	@Override
	protected List<DefibrillatorMarkerDTO> getDataFromDAO() throws BdxMapException {
		return defibrillatorDAO.getData();
	}
	
	@Override
	protected DefibrillatorMarkerBO newMarkerBO() {
		return new DefibrillatorMarkerBO();
	}
	
	@Override
	protected DefibrillatorMarkerBO setCustomFieldsBO(DefibrillatorMarkerDTO defibrillatorDTO, DefibrillatorMarkerBO defibrillatorBO) {
		defibrillatorBO.typology = defibrillatorDTO.typology;
		defibrillatorBO.information = defibrillatorDTO.information;
		return defibrillatorBO;
	}
}
